﻿using System.Collections.Generic;

namespace RXY_Mall.Core
{
    public class HostHelper
    {
        public static string GetImgUrl(string imgUrl)
        {
            if (string.IsNullOrWhiteSpace(imgUrl))
            {
                return AppConfig.HostUrl + "/upload/goods/default.png";
            }
            return AppConfig.HostUrl + imgUrl;
        }

        public static List<string> GetImgUrl(List<string> imgUrl)
        {
            List<string> imgs = new List<string>();
            foreach (var item in imgUrl)
            {
                imgs.Add(GetImgUrl(item));
            }
            return imgs;
        }
    }
}
